[mirrors]
http://downloads.sourceforge.net/project/tcl/Tcl/8.6.4/tcl8.6.4-src.tar.gz

[vars]
filesize=8915556
sha512=f348224f6c63aa899345a5c9b84d6ad1c0bfce5e22a86e4319900b561787855473888bd284f7ee55edf552ce32792b78649526af3641b0dff46590cad53b2489
tardir=tcl8.6.4
desc='interpreter for the TCL scripting language'

[deps]
sqlite

[build]
patch -p1 < "$K"/tcl-stat64.patch
rm -rf pkgs/*sqlit*
cd unix
rm -rf *sqlit*
rm -rf pkgs/*sqlit*
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags \
  tcl_cv_strtoul_unbroken=ok \
  tcl_cv_strtod_unbroken=ok \
  tcl_cv_strstr_unbroken=ok
make -j$MAKE_THREADS CFLAGS_DEFAULT=
make DESTDIR="$butch_install_dir" install
cd ..
